home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
MASSIND1.TAS
< prev
next >
Wrap
Text File
|
1992-06-03
|
2KB
|
69 lines
{ Mass Index.TAS
Compute the Mass Index Stocks and Commodities June 1992.
Article written by Donald Dorsey.
Program written by Sam Kerr (Prodigy-SXBX09A)
Rn
Mass Index = Summation n= 1 to 25 ----
Ln
where:
Rn = 0.8(Rn-1) + 0.2(Range)
Ln = 0.8(Ln-1) + 0.2(Rn)
Range = Todays high - low
Rn - 1 = Yesterday's Rn
Ln - 1 = Yesterday's Ln
A signal is indicated when the mass index goes over 27 then comes down
through 26.5. The trade is placed against the direction of the two
moving averages. If fast moving average(ma1) is greater than the slow
moving average(ma2) then this indicates a reversal bulge and an impending
direction change and would indicate a potential short. Buying would
be indicated when the mass index goes above 27 then breaks back down through
26.5 and m1 is less than m2.
The article says they chose an arbitrary period of 15 days as an exit point.
}
#MAX_QUOTES 300 {Minimun of 100}
#output_file 'massind1.LST+'
RNGE_DAILY : ARRAY;
SMOOTH_DAILY : ARRAY;
SMOOTH_SMOOTH : ARRAY;
SMOOTH_DIVISOR : ARRAY;
SUM_SMOOTH : ARRAY;
ma1 : ARRAY;
ma2 : ARRAY;
if first_ticker then
begin
writeln(' Mass ExpMA Fast Slow');
write('Sig Ticker Name Index Range MA MA ');
writeln('Close Vol Path');
end;
if quote_count < 50 or c < 10 THEN return;
graphit = 0; {If you want graphs set to 1 }
RNGE_DAILY = SUB(h,l);
SMOOTH_DAILY = MOV(RNGE_DAILY,25,'E');
SMOOTH_SMOOTH = MOV(SMOOTH_DAILY,25,'E');
SMOOTH_DIVISOR = DIV(SMOOTH_DAILY,SMOOTH_SMOOTH);
SUM_SMOOTH = SUM(SMOOTH_DIVISOR,25);
ma1 = MOV(c,25,'E');
ma2 = MOV(ma1,25,'E');
if sum_smooth < 26.5 and (sum_smooth[-1] >= 27 or
sum_smooth[-2] >= 27 or sum_smooth[-3] >= 27 or
sum_smooth[-4] >= 27 or sum_smooth[-5] >= 27 or
sum_smooth[-6] >= 27 or sum_smooth[-7] >= 27) then
gosub results;
return;
:results
if graphit <> 1 then goto pfile;
OPENGRAPH(2);
GRAPH(SUM_SMOOTH,'Mass Index');
GRAPH(C,'Close',ma1,'Mov Avg Fast',ma2,'Mov Avg Slow');
CLOSEGRAPH();
gosub pfile;
return;
:pfile
if ma1 < ma2 then sig = 'Buy '
else
sig = 'Sell';
writeln(sig,' ',ticker,fullname,' ',sum_smooth,smooth_daily,ma1,ma2,c,v,' ',
datapath);
return;